package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TransactionMiddleMapper;
import com.ruoyi.system.domain.TransactionMiddle;
import com.ruoyi.system.service.ITransactionMiddleService;

import javax.annotation.Resource;

/**
 * 交易中间Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-10
 */
@Service
public class TransactionMiddleServiceImpl implements ITransactionMiddleService 
{
    @Resource
    private TransactionMiddleMapper transactionMiddleMapper;

    /**
     * 查询交易中间
     * 
     * @param transactionId 交易中间主键
     * @return 交易中间
     */
    @Override
    public TransactionMiddle selectTransactionMiddleByTransactionId(String transactionId)
    {
        return transactionMiddleMapper.selectTransactionMiddleByTransactionId(transactionId);
    }

    /**
     * 查询交易中间列表
     * 
     * @param transactionMiddle 交易中间
     * @return 交易中间
     */
    @Override
    public List<TransactionMiddle> selectTransactionMiddleList(TransactionMiddle transactionMiddle)
    {
        return transactionMiddleMapper.selectTransactionMiddleList(transactionMiddle);
    }

    /**
     * 新增交易中间
     * 
     * @param transactionMiddle 交易中间
     * @return 结果
     */
    @Override
    public int insertTransactionMiddle(TransactionMiddle transactionMiddle)
    {
        return transactionMiddleMapper.insertTransactionMiddle(transactionMiddle);
    }

    /**
     * 修改交易中间
     * 
     * @param transactionMiddle 交易中间
     * @return 结果
     */
    @Override
    public int updateTransactionMiddle(TransactionMiddle transactionMiddle)
    {
        return transactionMiddleMapper.updateTransactionMiddle(transactionMiddle);
    }

    /**
     * 批量删除交易中间
     * 
     * @param transactionIds 需要删除的交易中间主键
     * @return 结果
     */
    @Override
    public int deleteTransactionMiddleByTransactionIds(String[] transactionIds)
    {
        return transactionMiddleMapper.deleteTransactionMiddleByTransactionIds(transactionIds);
    }

    /**
     * 删除交易中间信息
     * 
     * @param transactionId 交易中间主键
     * @return 结果
     */
    @Override
    public int deleteTransactionMiddleByTransactionId(String transactionId)
    {
        return transactionMiddleMapper.deleteTransactionMiddleByTransactionId(transactionId);
    }
}
